Machine Learning
The following section covers four machine learning steps,
- Classification Model Builder
- Prediction
- Build Model For Intent Classification And Entity Extraction
- Intent Classification And Entity Extraction
The first two Machine Learning plugin steps namely ‘Classification Model Builder’ and ‘Prediction’ let you build a classification model and then use this model for prediction. These plugin steps solve classification type problem where value to be predicted takes a set of discrete values as opposed to continues values (when the value being predicted is a continuous variable, such problem is called as regression problem). Below are a few examples where these steps can be used,
- Predict support group based on issue description
- Predict customer churn based on past customer data
- Predict occupational class of the person being insured based on various attributes of the person
- Predict customers from your customer list which are likely to show interest in your new promotions
The last two Machine Learning plugin steps namely ‘Build Model for Intent Classification’ and Entity Extraction’ and ‘Intent Classification and Entity Extraction’ let you build a model for Intent Classification and Entity Extraction and then use this model for Intent Classification and Entity Extraction. Identification of Intent and entity has a huge variety of use cases in industry wherever there is a need to understand the intention behind the utterances from users and automate certain processes.
Recommendation: For more accurate execution results, we recommend using Python version 3.10.0 and above.
Prerequisites:
- Use a system which has a minimum of 8GB RAM.
- AE Python setup (Python setup 3.6.1 or 3.8.10 or 3.10.0)
Support is available for Python 3.6.1, Python 3.8.10 and Python 3.10.0. However, you can use only one version at a time. User cannot use two or three python versions simultaneously.
For example, if you are currently using Python version 3.6.1 and want to use 3.8.10, then first close the current Process Studio instance, update the Python setup to version 3.8.10 and restart the Process Studio.
Three Ways to Install Python
- Install using python executable file(python.exe):
- Download and install python.exe from https://www.python.org/downloads/
- Use pip to install required third-party libraries based on your requirements.
- Add the following paths to the system PATH environment variable:
<path_till_python_directory>\Python310;<path_till_python_directory>\Python310\Scripts;
- Install using Anaconda:
- Download and install Anaconda from https://www.anaconda.com/download
- Use pip, conda or Anaconda GUI to install required third-party libraries based on your requirements.
For above two types of installation, the user is responsible for installation, dependency setup, and resolving any configuration issues.
- Install using AE_Python:
- Get the python setup zip file (Python36.zip or Python38.zip or Python310.zip) from AutomationEdge.
- Extract the Python setup ZIP file. To install a specific Python version compatible with your AE version, refer to the corresponding installation steps.
AE_Python.zip is available only for Windows OS. For other OS users, please reach out to your System Administrator for help with Python installation.
Advantages of using AE_Python zip:
- The extracted Python files from the ZIP take significantly less disk space compared to the Python installation using the Anaconda setup.
- If system is using Python 2.x and if user wants to use Python 3.10.0 for AE purpose, then user can do so easily by keeping AE_Python inside specific location.
User's original Python 2.x and path in environment variables will not be touched.
AE Python Installation based on Python Versions:
Please refer the following AE Version 3.x [Python 3.x] installation for setup steps explained in detail:
1) AE Version 3.0 [Python 3.10.0]:
For default installation:
- Get Python Setup zip (Python310.zip) file from AutomationEdge.
- Extract Python310.
- Add the following file paths to the PATH Environment Variable as follow:
<path_till_python_directory>\Python310;
<path_till_python_directory>\Python310\Scripts; - To work with DocEdge plugin, you must also complete the following additional installation:
a. Double-click on the gs10031w64.exe install and the Ghostscript.
The Ghostscript Python package (a wrapper) is already included in the AE_Python310 setup. However, it only acts as an interface and requires the actual Ghostscript software to be installed manually on your machine. Without the software, the Python package won't function properly.
b. Set up the following path:
i. Open the Start menu and search for Environment Variables.
ii. Click Edit the system environment variables.
iii. In the System Properties dialog, click Environment Variables.
iv. In the Environment Variables dialog, find the Path variable in the System Variables section, select the variable, and click Edit.
v. Click New and add the path to the bin directory in the Ghostscript installation folder, For example, C:\Program Files\gs\gs9.54.0\bin.
vi. Click OK to close all windows.
c. To verify the Ghostscript installation execute the following command:
i. Open a new command prompt window.
ii. For 64-bit installation, type gswin64c -version. The details appear on the screen, confirming that the Ghostscript is installed correctly, and the path is set up properly.
For AE specific installation:
- Get Python Setup zip(Python310.zip) file from AutomationEdge.
- Close Process Studio instances and/or Agents where Machine Learning plugin is to be used.
- Create a folder named python(case sensitive-use all lower case letters) inside your
<Process Studio root>and/or<Agent root>folders*. - Unzip the downloaded zip file in following location:
<Process Studio root>/python/
and / or<Agent root>/python/ - Post completion of above step, your folder structure should now look like
<Process Studio root>/python/AE_Python<Version>
For example,D:/process-studio/python/AE_Python310<Agent root>/python/AE_Python<Version>
For example,D:/ae-agent/python/AE_Python310 - To work with DocEdge plugin, you must also complete the following additional installation:
a. Double-click on the gs10031w64.exe and install the Ghostscript.
The Ghostscript Python package (a wrapper) is already included in the AE_Python310 setup. However, it only acts as an interface and requires the actual Ghostscript software to be installed manually on your machine. Without the software, the Python package won't function properly.
b. Set up the following path:
i. Open the Start menu and search for Environment Variables.
ii. Click Edit the system environment variables.
iii. In the System Properties dialog, click Environment Variables.
iv. In the Environment Variables dialog, find the Path variable in the System Variables section, select the variable, and click Edit.
v. Click New and add the path to the bin directory in the Ghostscript installation folder.For example, C:\Program Files\gs\gs9.54.0\bin
vi. Click OK to close all windows.
c. To verify the Ghostscript installation execute the following command:
d. Open a new command prompt window.
e. For 64-bit installation, type gswin64c -version.
The details appear on the screen,confirming that the Ghostscript is installed correctly, and the path is set up properly.
7. Start Process Studio instances and/or Agents wherever this change has been made. In case if we have not already closed either the Process Studio instance or AE-Agent instance, simply restart these instances to achieve the same impact.
<Process Studio Root> is the main Process Studio folder once you have unzipped the Process Studio zip file downloaded from AEUI <by default, the folder name is process-studio> and similarly <Agent home> is main agent folder after unzipping <named ae-agent>.
2) AE Version 2.1 [Python 3.8.10] installation:
For Default Installation:
-
Get Python Setup zip(Python38.zip) file from AutomationEdge.
-
Extract Python38.
-
Add the following filepaths to the PATH Environment Variable as follow:
<path_till_python_directory>\Python38;<path_till_python_directory>\Python38\Scripts; -
Create symbolic link for spacy en_core_web_sm model: i. Traverse to below path:
..\Python38\lib\site-packages\spacy\dataii. Delete folder/directory viz., en. iii. On Command line execute the following command to create symbolic link:python -m spacy link en_core_web_sm en –force -
To work with DocEdge plugin, you must also complete the following additional installation:
i. Double-click on the gs10031w64.exe and install the Ghostscript.Note:The Ghostscript Python package (a wrapper) is already included in the AE_Python310 setup. However, it only acts as an interface and requires the actual Ghostscript software to be installed manually on your machine. Without the software, the Python package won't function properly.
-
Set up the following path:
i. Open the Start menu and search for Environment Variables.
ii. Click Edit the system environment variables.
iii. In the System Properties dialog, click Environment Variables.
iv. In the Environment Variables dialog, find the Path variable in the System Variables section, select the variable, and click Edit.
v. Click New and add the path to the bin directory in the Ghostscript installation folder.
For example,C:\Program Files\gs\gs9.54.0\binvi. Click OK to close all windows. -
To verify the Ghostscript installation, execute the following command:
i. Open a new command prompt window.
ii. For 64-bit installation, type gswin64c -version. The details appear on the screen, confirming that the Ghostscript is installed correctly, and the path is set up properly.
For AE Specific Installation:
- Get Python Setup zip (Python38.zip) file from AutomationEdge.
- Close Process Studio instances and/or Agents where Machine Learning plugin is to be used.
- Create a folder named python(case sensitive-use all lower case letters) inside your
<Process Studio root>and/or<Agent root>folders*. - Unzip the downloaded zip file in following location:
<Process Studio root>/python/
and / or<Agent root>/python/ - Post completion of above step, your folder structure should now look like
<Process Studio root>/python/AE_Python<Version>
For example,D:/process-studio/python/AE_Python38<Agent root>/python/AE_Python<Version>
For example,D:/ae-agent/python/AE_Python38 - Create symbolic link for spacy en_core_web_sm model:
i. Traverse to below path:..\Python38\lib\site-packages\spacy\data
ii. Delete folder/directory viz., en.
iii. On command line execute the following command to create symbolic link:python -m spacy link en_core_web_sm en --force - To work with DocEdge plugin, you must also complete the following additional installation:
i. Double-click on the gs10031w64.exe and install the Ghostscript.
The Ghostscript Python package (a wrapper) is already included in the AE_Python310 setup. However, it only acts as an interface and requires the actual Ghostscript software to be installed manually on your machine. Without the software, the Python package won't function properly.
ii. Set up the following path:
1. Open the Start menu and search for Environment Variables.
2. Click Edit the system environment variables.
3. In the System Properties dialog, click Environment Variables.
4. In the Environment Variables dialog, find the Path variable in the System Variables section, select the variable, and click Edit.
5. Click New and add the path to the bin directory in the Ghostscript installation folder.
For example, C:\Program Files\gs\gs9.54.0\bin
iii. Click OK to close all windows.
iv. To verify the Ghostscript installation, execute the following command:
- Open a new command prompt window.
- For 64-bit installation, type gswin64c -version. The details appear on the screen, confirming that the Ghostscript is installed correctly, and the path is set up properly.
3) AE Version 2.0 [Python 3.8.10] installation:
For default installation:
- Get Python Setup zip(Python38.zip) file from AutomationEdge.
- Extract Python38.
- Add the following file paths to the PATH Environment Variable as below:
<path_till_python_directory>\Python38;<path_till_python_directory>\Python38\Scripts; - Create symbolic link for spacy en_core_web_sm model:
i. Traverse to below path:
..\Python38\lib\site-packages\spacy\dataii. Delete folder/directory viz., en. iii. On Command line execute the following command to create symbolic link:python -m spacy link en_core_web_sm en –force
For AE Specific Installation:
- Get Python Setup zip(Python38.zip) file from AutomationEdge.
- Close Process Studio instances and/or Agents where Machine Learning plugin is to be used.
- Create a folder named python(case sensitive-use all lower case letters) inside your
<Process Studio root>and/or<Agent root>folders*. - Unzip the downloaded zip file in following location:
<Process Studio root>/python/
and / or
<Agent root>/python/ - Post completion of above step, your folder structure should now look like
<Process Studio root>/python/AE_Python<Version>
For example,D:/process-studio/python/AE_Python38
<Agent root>/python/AE_Python<Version>
For example,D:/ae-agent/python/AE_Python38 - Create symbolic link for spacy en_core_web_sm model:
a. Traverse to below path:
..\Python38\lib\site-packages\spacy\data
b. Delete folder/directory viz., en.
c. On Command line execute the following command to create symbolic link:
python -m spacy link en_core_web_sm en –force - Start Process Studio instances and/or Agents wherever this change has been made.In case if we have not already closed either the Process Studio instance or AE-Agent instance, simply restart these instances to achieve the same impact.
<Process Studio Root> is the main Process Studio folder once you have unzipped the Process Studio zip file downloaded from AEUI <by default, the folder name is process-studio> and similarly <Agent home> is main agent folder after unzipping <named ae-agent>.
4) AE Version 1.0 [Python 3.6.1] installation: For default installation:
- Get Python Setup zip(Python36.zip) file from AutomationEdge.
- Extract Python36
- Add the following filepaths to the PATH Environment Variable as below:
<path_till_python_directory>\Python36;
<path_till_python_directory>\Python36\Scripts;
- Create symbolic link for spacy en_core_web_sm model:
i. Traverse to below path:
..\Python36\lib\site-packages\spacy\data- Delete folder/directory viz., en
- On Command line execute the following command to create symbolic link:
'python -m spacy link en_core_web_sm en --force` - For older generation Pentium machines hardware, install specific Tensorflow libraries
- Microsoft Visual Studio C++ distribution specific to Windows OS
- Steps viz., Intent Entity Model Builder and Intent Entity Prediction use Tensorflow libraries. For compilation of these Tensorflow libraries, the processing machine’s processor requires,AVX –Instruction Set Extension support. You may refer your Processor manual to check for AVX support. (for e.g. in case of intel processor the details can be obtained from the following URL- https://ark.intel.com/content/www/us/en/ark.html#@Processors)
For AE specific installation:
- Get Python Setup zip (Python36.zip) file from AutomationEdge.
- Close Process Studio instances and/or Agents where Machine Learning plugin is to be used.
- Create a folder named python(case sensitive-use all lower case letters) inside your
<Process Studio root>
and/or<Agent root>folders*. - Unzip the downloaded zip file in following location:
<Process Studio root>/python/
and / or
<Agent root>/python/ - Post completion of above step, your folder structure should now look like
<Process Studio root>/python/AE_Python<Version>
For example,D:/process-studio/python/AE_Python36<Agent root>/python/AE_Python<Version>
For example,D:/ae-agent/python/AE_Python36 - Create symbolic link for spacy en_core_web_sm model:
a. Traverse to below path:..\Python38\lib\site-packages\spacy\data
b. Delete folder/directory viz., en.
c. On Command line execute the following command to create symbolic link:
python -m spacy link en_core_web_sm en –force - For older generation Pentium machines hardware, install specific Tensorflow libraries
- Microsoft Visual Studio C++ distribution specific to Windows OS
- Steps viz., Intent Entity Model Builder and Intent Entity Prediction use Tensorflow libraries. For compilation of these Tensorflow libraries, the processing machine’s processor requires, AVX –Instruction Set Extension support. You may refer your Processor manual to check for AVX support. (for e.g. in case of intel processor the details can be obtained from the following URL- https://ark.intel.com/content/www/us/en/ark.html#@Processors)
- Start Process Studio instances and/or Agents wherever this change has been made. In case if we have not already closed either the Process Studio instance or AE-Agent instance, simply restart these instances to achieve the same impact.
<Process Studio Root> is the main Process Studio folder once you have unzipped the Process Studio zip file downloaded from AEUI <by default, the folder name is process-studio> and similarly <Agent home> is main agent folder after unzipping <named ae-agent>.